<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>le-pasta: QueryEvaluator Class Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">le-pasta
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="../../classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="../../hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="../../functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d9/d87/class_query_evaluator.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="../../de/dfb/class_query_evaluator-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">QueryEvaluator Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="../../d2/d10/_query_evaluator_8h_source.html">QueryEvaluator.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a940542f39e377fc737b5be4950bdd671"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d87/class_query_evaluator.html#a940542f39e377fc737b5be4950bdd671">QueryEvaluator</a> (<a class="el" href="../../da/dc8/class_a_s_t.html">AST</a> &amp;ast, <a class="el" href="../../d9/d19/class_design_entity_table.html">DesignEntityTable</a> *deTable, <a class="el" href="../../de/d1e/class_follows.html">Follows</a> &amp;follows, <a class="el" href="../../d3/de5/class_modifies.html">Modifies</a> &amp;modifies, <a class="el" href="../../df/dc0/class_parent.html">Parent</a> &amp;parent, <a class="el" href="../../df/d6c/class_uses.html">Uses</a> &amp;uses, <a class="el" href="../../de/d09/class_var_table.html">VarTable</a> &amp;varTable)</td></tr>
<tr class="separator:a940542f39e377fc737b5be4950bdd671"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ee541459b8e4dfe78e32c7dc9dedad7"><td class="memItemLeft" align="right" valign="top">list&lt; string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d87/class_query_evaluator.html#a0ee541459b8e4dfe78e32c7dc9dedad7">evaluateCompleteQuery</a> (<a class="el" href="../../d6/d47/class_complete_query.html">CompleteQuery</a> *completeQuery)</td></tr>
<tr class="separator:a0ee541459b8e4dfe78e32c7dc9dedad7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1954636f3ed0c4742246eb83dbdccbb"><td class="memItemLeft" align="right" valign="top">vector&lt; pair&lt; int, int &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d87/class_query_evaluator.html#af1954636f3ed0c4742246eb83dbdccbb">evaluateSuchThat</a> (<a class="el" href="../../d1/d2d/class_query.html">Query</a> *query)</td></tr>
<tr class="separator:af1954636f3ed0c4742246eb83dbdccbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fb6f1aaaa7f49d7afae3d88133873a7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d87/class_query_evaluator.html#a8fb6f1aaaa7f49d7afae3d88133873a7">evaluatePattern</a> (<a class="el" href="../../d1/d2d/class_query.html">Query</a> *query)</td></tr>
<tr class="separator:a8fb6f1aaaa7f49d7afae3d88133873a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa48b7b548f1b3f054f1845e9a6cb4d64"><td class="memItemLeft" align="right" valign="top">vector&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d87/class_query_evaluator.html#aa48b7b548f1b3f054f1845e9a6cb4d64">intersect</a> (vector&lt; int &gt; vect1, vector&lt; int &gt; vect2)</td></tr>
<tr class="separator:aa48b7b548f1b3f054f1845e9a6cb4d64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91ba76ab47c669b0d823fbc683d9a7e7"><td class="memItemLeft" align="right" valign="top">vector&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d87/class_query_evaluator.html#a91ba76ab47c669b0d823fbc683d9a7e7">getInitialResultList</a> (<a class="el" href="../../d1/d2b/_synonym_8h.html#a815a9d7da02ab09239a410acc9f149a8">VAR_TYPE</a> vt)</td></tr>
<tr class="separator:a91ba76ab47c669b0d823fbc683d9a7e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad191002e8d9d599a06c09d9aeeb7f35e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d87/class_query_evaluator.html#ad191002e8d9d599a06c09d9aeeb7f35e">updateMap</a> (int param_id, <a class="el" href="../../d1/d2b/_synonym_8h.html#a815a9d7da02ab09239a410acc9f149a8">VAR_TYPE</a> param_type, string param_name, vector&lt; pair&lt; int, int &gt;&gt; res)</td></tr>
<tr class="separator:ad191002e8d9d599a06c09d9aeeb7f35e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a283113890844f34a50ee429b7a30d8b4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d87/class_query_evaluator.html#a283113890844f34a50ee429b7a30d8b4">~QueryEvaluator</a> ()</td></tr>
<tr class="separator:a283113890844f34a50ee429b7a30d8b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a940542f39e377fc737b5be4950bdd671"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QueryEvaluator::QueryEvaluator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../da/dc8/class_a_s_t.html">AST</a> &amp;&#160;</td>
          <td class="paramname"><em>ast</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/d19/class_design_entity_table.html">DesignEntityTable</a> *&#160;</td>
          <td class="paramname"><em>deTable</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../de/d1e/class_follows.html">Follows</a> &amp;&#160;</td>
          <td class="paramname"><em>follows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/de5/class_modifies.html">Modifies</a> &amp;&#160;</td>
          <td class="paramname"><em>modifies</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../df/dc0/class_parent.html">Parent</a> &amp;&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../df/d6c/class_uses.html">Uses</a> &amp;&#160;</td>
          <td class="paramname"><em>uses</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../de/d09/class_var_table.html">VarTable</a> &amp;&#160;</td>
          <td class="paramname"><em>varTable</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor Creates a <a class="el" href="../../d9/d87/class_query_evaluator.html">QueryEvaluator</a> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ast</td><td><a class="el" href="../../da/dc8/class_a_s_t.html">AST</a> </td></tr>
    <tr><td class="paramname">deTable</td><td>A design entity table </td></tr>
    <tr><td class="paramname">follows</td><td><a class="el" href="../../de/d1e/class_follows.html">Follows</a> table </td></tr>
    <tr><td class="paramname">modifies</td><td><a class="el" href="../../d3/de5/class_modifies.html">Modifies</a> table </td></tr>
    <tr><td class="paramname">parent</td><td><a class="el" href="../../df/dc0/class_parent.html">Parent</a> table </td></tr>
    <tr><td class="paramname">uses</td><td><a class="el" href="../../df/d6c/class_uses.html">Uses</a> table </td></tr>
    <tr><td class="paramname">varTable</td><td><a class="el" href="../../d2/d3c/class_variable.html">Variable</a> table </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a283113890844f34a50ee429b7a30d8b4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QueryEvaluator::~QueryEvaluator </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a0ee541459b8e4dfe78e32c7dc9dedad7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">list&lt; string &gt; QueryEvaluator::evaluateCompleteQuery </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d6/d47/class_complete_query.html">CompleteQuery</a> *&#160;</td>
          <td class="paramname"><em>completeQuery</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Evaluates a given complete query </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">completeQuery</td><td>a complete query </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a list of string to answer the complete query </dd></dl>

</div>
</div>
<a class="anchor" id="a8fb6f1aaaa7f49d7afae3d88133873a7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool QueryEvaluator::evaluatePattern </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d1/d2d/class_query.html">Query</a> *&#160;</td>
          <td class="paramname"><em>query</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Evaluates a given pattern query </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">query</td><td>a pattern query </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>boolean whether the pattern is satisfiable or not, map will be updated internally </dd></dl>

</div>
</div>
<a class="anchor" id="af1954636f3ed0c4742246eb83dbdccbb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt; pair&lt; int, int &gt; &gt; QueryEvaluator::evaluateSuchThat </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d1/d2d/class_query.html">Query</a> *&#160;</td>
          <td class="paramname"><em>query</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Evaluates a given such that query </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">query</td><td>a such that query </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a vector of integer pair directly from the relationship tables </dd></dl>

</div>
</div>
<a class="anchor" id="a91ba76ab47c669b0d823fbc683d9a7e7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt; int &gt; QueryEvaluator::getInitialResultList </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d1/d2b/_synonym_8h.html#a815a9d7da02ab09239a410acc9f149a8">VAR_TYPE</a>&#160;</td>
          <td class="paramname"><em>vt</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get an initial result list from a DE table </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vt</td><td>a variable type to get the result from </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a vector of integer containing all the values from DE </dd></dl>

</div>
</div>
<a class="anchor" id="aa48b7b548f1b3f054f1845e9a6cb4d64"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt; int &gt; QueryEvaluator::intersect </td>
          <td>(</td>
          <td class="paramtype">vector&lt; int &gt;&#160;</td>
          <td class="paramname"><em>vect1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; int &gt;&#160;</td>
          <td class="paramname"><em>vect2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Compute an intersection between 2 vectors </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vect1</td><td>a vector of int </td></tr>
    <tr><td class="paramname">vect2</td><td>a vector of int </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a vector of integer that is the intersection of the 2 given vectors. </dd></dl>

</div>
</div>
<a class="anchor" id="ad191002e8d9d599a06c09d9aeeb7f35e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool QueryEvaluator::updateMap </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>param_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d1/d2b/_synonym_8h.html#a815a9d7da02ab09239a410acc9f149a8">VAR_TYPE</a>&#160;</td>
          <td class="paramname"><em>param_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>param_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; pair&lt; int, int &gt;&gt;&#160;</td>
          <td class="paramname"><em>res</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Updates the variables mapper </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">param_id</td><td>an ID to decide which pair is taken </td></tr>
    <tr><td class="paramname">param_type</td><td>the variable type to be updated </td></tr>
    <tr><td class="paramname">param_name</td><td>the parameter name to be updated </td></tr>
    <tr><td class="paramname">res</td><td>a result vector from such that queries </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a boolean indicating whether a result is true or false </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>E:/le-pasta/source/<a class="el" href="../../d2/d10/_query_evaluator_8h_source.html">QueryEvaluator.h</a></li>
<li>E:/le-pasta/source/<a class="el" href="../../dd/d8e/_query_evaluator_8cpp.html">QueryEvaluator.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d9/d87/class_query_evaluator.html">QueryEvaluator</a></li>
    <li class="footer">Generated on Thu Apr 18 2013 03:04:54 for le-pasta by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.3.1 </li>
  </ul>
</div>
</body>
</html>
